home *** CD-ROM | disk | FTP | other *** search
Wrap
#!/bin/csh # # SNt showcase with synchronized audio playback by John Magdziarz # SNt launch script by Andrew Cameron # set there = `dirname $0`/ setenv XUSERFILESEARCHPATH ${there}/%N set path = ( ${there} $path ) setenv LD_LIBRARY_PATH ${there}:/usr/lib/libsNt set complete_file=`tail -2 $argv[$#argv] | grep -c "wsNt"` if ( ${complete_file} != 1 ) then echo "Error: Incomplete file transfer," echo " check your disk space and try again." exit 1 endif set wsnt_cnt=`tail -1 $argv[$#argv]` @ wsnt_cnt_t = $wsnt_cnt - 3 @ wsnt_cnt_h = $wsnt_cnt_t - 1 set name0 = `tail -$wsnt_cnt $argv[$#argv] | head -2 | tail -1` set dir0 = `dirname $argv[$#argv]` set name = `basename $name0` #loading "Loading $name:r Audio and Showcase files takes a little time. Please stand by..." 120 set control_file = `tail -2 $argv[$#argv] | grep -c "control"` if ( ${control_file} ) then if ( -p /tmp/.${name}.ctl ) then set command = `tail -3 $argv[$#argv] | head -1` echo $command > /tmp/.${name}.ctl #echo $command sent to /tmp/.${name}.ctl else echo ${name} is not an active sNt presentation at this time. echo To activate this presentation, use the red sNt "Presentation" icon. endif exit endif set tmpfile = /usr/tmp/wsnt$$.wsnt echo "2" > $tmpfile echo $name0 >> $tmpfile #head -3 $argv[$#argv] | tail -1 #>> $tmpfile echo $* >> $tmpfile tail -$wsnt_cnt_t $argv[$#argv] | head -$wsnt_cnt_t >> $tmpfile if (-e /tmp/snt_debug) (xconfirm -t "Starting sNt ..." -B Dismiss &) >& /dev/null set snt_opts="" if ( -e /tmp/snt_edit ) set snt_opts="-e" if ( $?SNT_VERBOSE ) then (${there}/snt $snt_opts -v $tmpfile ; /bin/rm -f $tmpfile) >&/dev/console else (${there}/snt $snt_opts $tmpfile ; /bin/rm -f $tmpfile) >&/dev/null endif if ( -e ${dir0}/$name:r.wsnt ) then else if ( $argv[$#argv] != ${dir0}/$name:r.wsnt ) then switch (`xconfirm -t "Do you want to keep this wsnt/audio file for later use?" -t " " -t "(ie. rename $argv[$#argv] to ${dir0}/$name:r.wsnt)" -B Yes -b no`) case Yes: mv $argv[$#argv] ${dir0}/$name:r.wsnt ln -s ${dir0}/$name:r.wsnt $argv[$#argv] breaksw case No: echo "Skipping ..." breaksw endsw endif endif